<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
  <head> 
	<%@ include file="/platform/style.jsp"%>
	<style>
		.ss0{color:red}
	</style>
	<script>
	function query(){
		$w.execForm({pageNum:1})
	}
	function add(){
		window.parent.$w.openDialog({url:ctx+'/sysman/SysmanPage@areatradshow.page',title:"添加控销区域 ",w:550,h:170,afterClose:function(re){
			if(re)$w.execForm();
		}});
	}
	function edit(id){
		window.parent.$w.openDialog({url:ctx+'/sysman/SysmanPage@areatradshow.page?bean.id='+id,title:"修改控销区域 ",w:550,h:170,afterClose:function(re){
			if(re)$w.execForm();
		}});
	}
	function del(id){
		window.parent.$w.confirmMsg("确定删除？", function(r){
			if(r){
				$w.doUrl(ctx+"/sysman/SysmanPage@areatradDel.page?bean.id="+id,{},function(json){
					$w.execForm();
				})
			}
		})
	}
	
	</script>
  </head>
  
  <body class="easyui-layout">
	<div data-options="region:'center'" class="bodybg">
		<!-- 查询区域 -->
		<form id="queryForm" action="/sysman/SysmanPage@areatradList.page" method="post">
		<div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
			<a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="add()" style="width:80px;">添加区域</a>
		</div>
		<div class="ui_line" style="margin-top:10px"></div>
		<!-- 数据列表区域 -->
			<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false">
				<thead>
					<tr class="ui_th">
						<td width="40">ID</td>
						<td >控销区域</td>
						<td width="140" align="center">操作</td>
					</tr>
				</thead>
				<tbody>
				<w:iterate id="info" bind="list">
					<tr class="ui_td">
						<td><w:write bind="#info.id"/></td>
						<td><w:write bind="#info.text"/></td>
						<td align="center">
							<a href="javascript:void(0);" class="ui_btn marginR8" onclick="edit(<w:write bind="#info.id"/>)">修改</a><a href="javascript:void(0);" class="ui_btn" onclick="del(<w:write bind="#info.id"/>)">删除</a>
						</td>
					</tr>
				</w:iterate>
				</tbody>
			</table>
			<w:switch><w:case bind="list.size()==0"><div class="nodata bgfff">没有相关数据！</div></w:case></w:switch>
		</form>
	</div>
  </body>
</html>
